<template>
  <div>
    <van-tabbar  active-color inactive-color v-model="active" z-index="2" safe-area-inset-bottom placeholder >
      <van-tabbar-item icon="i iconfont icon-movie" to="/flims/nowPlaying" >电影</van-tabbar-item>
      <van-tabbar-item icon="i iconfont icon-yingyuan" to="/cinemas" >影院</van-tabbar-item>
      <van-tabbar-item icon="i iconfont icon-zixun" to="/active" >资讯</van-tabbar-item>
      <van-tabbar-item icon="i iconfont icon-wode" to="/center" >我的</van-tabbar-item>
    </van-tabbar>
    </div>
</template>
<script>

export default {
  data () {
    return {
      active: 0
    }
  },
  mounted () {
    if (window.location.pathname.indexOf('cinema') > -1) {
      this.active = 1
    } else if (window.location.pathname.indexOf('active') > -1) {
      this.active = 2
    } else if (window.location.pathname.indexOf('center') > -1) {
      this.active = 3
    } else {
      this.active = 0
    }
  }
}
</script>
<style lang="scss" scoped>
</style>
